//
//  LXUser.h
//  LvXi_newVersion
//
//  Created by 王敏 on 16/8/15.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "NSUserDefaults+LXUserDefaults.h"

#define User_id [[NSUserDefaults standardUserDefaults] valueForKey:KeyOfUserId]

#define User_name [[NSUserDefaults standardUserDefaults] valueForKey:KeyOfUserName]

#define User_nickname [[NSUserDefaults standardUserDefaults] valueForKey:KeyOfUserNickname]

#define User_mobile [[NSUserDefaults standardUserDefaults] valueForKey:KeyOfUserMobile]

#define User_invitecode [[NSUserDefaults standardUserDefaults] valueForKey:KeyOfUserInvitecode]

#define User_headerImage [[NSUserDefaults standardUserDefaults] valueForKey:KeyOfUserHeaderImage]

#define User_greenBeanCount [[NSUserDefaults standardUserDefaults] valueForKey:KeyOfUserBeannums]

#define LoginState [[NSUserDefaults standardUserDefaults] boolForKey:KeyOfUserLoginState]

#define SetLoginState(state) [[NSUserDefaults standardUserDefaults] setBool:state forKey:KeyOfUserLoginState]

@interface LXUser : NSObject
/**用户名*/
@property(nonatomic,copy)NSString * username;

/**手机号*/
@property(nonatomic,copy)NSString * mobile;

/**密码*/
@property(nonatomic,copy)NSString * password;

/**邀请码*/
@property(nonatomic,copy)NSString * invitecode;

/**绑定qq的ID*/
@property(nonatomic,copy)NSString * qqid;

/**绑定微信的ID*/
@property(nonatomic,copy)NSString * weixinid;

/**绑定微博的ID*/
@property(nonatomic,copy)NSString * weiboid;

/**绑定支付宝的ID*/
@property(nonatomic,copy)NSString * alipayid;

/**uid*/
@property(nonatomic,copy)NSString * uid;

/**用户id*/
@property(nonatomic,copy)NSString * user_id;

/**昵称*/
@property(nonatomic,copy)NSString * nickname;

/**用户信息*/
@property(nonatomic,strong)NSDictionary * userInfo;

/**头像*/
@property(nonatomic,copy)NSString * headerImage;

/**绿豆数*/
@property(nonatomic,copy)NSString * bean_nums;

/**未付款订单数量*/
@property(nonatomic,copy)NSString * ordernotpaye;

/**全部订单*/
@property(nonatomic,copy)NSString * orederall;

/**佣金*/
@property(nonatomic,copy)NSString * commission;

/**性别*/
@property(nonatomic,copy)NSString * sex;


+(instancetype)shareUser;

+(void)upDataUserInfoWith:(NSDictionary*)userInfo;

+(void)logout;

@end

UIKIT_EXTERN NSString * const KeyOfUserName;
UIKIT_EXTERN NSString * const KeyOfUserMobile;
UIKIT_EXTERN NSString * const KeyOfUserPassword;
UIKIT_EXTERN NSString * const KeyOfUserInvitecode;
UIKIT_EXTERN NSString * const KeyOfUserQQid;
UIKIT_EXTERN NSString * const KeyOfUserWeixinid;
UIKIT_EXTERN NSString * const KeyOfUserWeiboid;
UIKIT_EXTERN NSString * const KeyOfUserAlipayid;
UIKIT_EXTERN NSString * const KeyOfUserUid;
UIKIT_EXTERN NSString * const KeyOfUserId;
UIKIT_EXTERN NSString * const KeyOfUserNickname;
UIKIT_EXTERN NSString * const KeyOfUserHeaderImage;
UIKIT_EXTERN NSString * const KeyOfUserBeannums;
UIKIT_EXTERN NSString * const KeyOfUserOrdernotpaye;
UIKIT_EXTERN NSString * const KeyOfUserOrederall;
UIKIT_EXTERN NSString * const KeyOfUserCommission;
UIKIT_EXTERN NSString * const KeyOfUserLoginState;
